home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / turlwin2.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.1 KB  |  42 lines

  1. //    Copyright (c) 1993, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TURLWindow
  4. //    Include File:    turlwind.h
  5. //    Purpose:    Provide a window for a URL
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //    Revision History:
  8. //        12-27-93    created
  9. //        02-09-94    Split all members into seperate files.
  10. #define Uses_TProgram
  11. #define Uses_TDeskTop
  12. #include"turlwind.h"
  13.  
  14. TURLWindow::TURLWindow(const char *cp_URL) :
  15.     TWindow(TProgram::deskTop->getExtent(), NULL, Number()),
  16.     TWindowInit(&TWindow::initFrame)    {
  17. //    Purpose:    Constructor for the URL window
  18. //    Arguments:    cp_URL    The url to create the window for.
  19. //    Remarks/Portability/Dependencies/Restrictions:
  20. //    Revision History:
  21. //        12-27-93    created
  22.  
  23.     //    Set our window options and size, no draw buffering.
  24.     options |= ofTileable;
  25.     TRect TR = getExtent();
  26.     TR.grow(-1, -1);
  27.  
  28.     //    No view yet.
  29.     TURLV = NULL;
  30.     B_isIndex = False;
  31.  
  32.     //    Create the stack of visited anchors for this window.
  33.     TNSCp_visited = new TNSCollection(1, 1);
  34.     if(TNSCp_visited == NULL)    {
  35.         doslynxmessage("Unable to allocate memory for window.");
  36.         OwnerClose();
  37.     }
  38.  
  39.     //    Attempt to load the document.
  40.     URLoader(cp_URL);
  41. }
  42.